package com.kerrykidz.system.util.quartz;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.kerrykidz.sms.util.SmsTask;
import com.kerrykidz.system.service.ICourseService;
import com.rdp.framework.exception.RDPException;
import com.rdp.util.config.SpringUtil;

public class CourseTask extends QuartzJobBean{
	private Logger logger = Logger.getLogger(SmsTask.class);  
	@Override
	protected void executeInternal(JobExecutionContext context)throws JobExecutionException {
		ICourseService courseService = (ICourseService) SpringUtil.getBean("courseServiceImpl");
		try {
			courseService.updateCourseOver();
		} catch (RDPException e) {
			logger.error("定时检测课程过期异常" + e.getMessage());
		}
	}
}
